package common.body;

import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.StrUtil;
import common.enums.ProtocolEnum;

/**
 * @author gitama
 * @version 1.0
 * @date 2022/12/05
 */
public class TcpTunnelBody extends BaseBody {

    private String bsId;

    private String protocol;

    private ProtocolEnum protocolEnum;

    private String host;

    private String clientToken;

    Integer port;

    public String getClientToken() {
        return clientToken;
    }

    public void setClientToken(String clientToken) {
        this.clientToken = clientToken;
    }

    public TcpTunnelBody() {
    }

    public TcpTunnelBody(String bsId, String protocol) {
        this.bsId = bsId;
        this.protocol = protocol;
    }

    public TcpTunnelBody(String bsId, String protocol, String host, Integer port) {
        this.bsId = bsId;
        this.protocol = protocol;
        this.host = host;
        this.port = port;
    }

    public TcpTunnelBody(String protocol, String host, Integer port) {
        this.protocol = protocol;
        this.host = host;
        this.port = port;
    }

    public TcpTunnelBody(ProtocolEnum protocolEnum, String host, Integer port) {
        this.protocol = protocolEnum.code;
        this.protocolEnum = protocolEnum;
        this.host = host;
        this.port = port;
    }

    public ProtocolEnum getProtocolEnum() {
        return protocolEnum;
    }

    public String getBsId() {
        return bsId;
    }

    public void setBsId(String bsId) {
        this.bsId = bsId;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public void setProtocolEnum(ProtocolEnum protocolEnum) {
        this.protocolEnum = protocolEnum;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
}
